/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.model.geom;

import java.util.List;

/**
 * @author chunquedong
 * 
 */
public class MultiPolygon extends MultiGeometry<Polygon> {

	public MultiPolygon(List<Polygon> list) {
		super(list);
	}

	@Override
	public String toString() {
		StringBuilder str = new StringBuilder();
		str.append("MULTIPOLYGON(");
		for (Polygon pg : geometrys) {
			str.append(pg.toMyString() + ",");
		}
		str.deleteCharAt(str.lastIndexOf(","));
		str.append(")");
		return str.toString();
	}

	@Override
	public GeometryType getGeometryType() {
		return GeometryType.MultiPolygon;
	}
}